<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="layout" content="wechat"/>
    <title>免费评房</title>
</head>

<body>
<header class="create-header">
    <ul class="creat-flowList flex-box">
        <li data-id="01" class="flex1 active">
            <span></span>

            <h3>房产详细地址</h3>
        </li>
        <li data-id="03" class="flex1 active">
            <span></span>

            <h3>极速估值</h3>
        </li>
    </ul>
</header>

<form resource="${this.leads}">
    <div class="bgcWhite asset-valuation">
        <div class="valuation-info">
            <g:if test="${this.params.status == "Completed"}">
                <div class="valuation-info-warp">
                    <div class="valuation-info-top">
                        <div class="valuation-info-top-txt">最高可贷金额<span>（可贷金额以实际金额为准）</span></div>

                        <div class="valuation-info-top-txt-val"><g:formatNumber
                                number="${this.leads?.loanAmount / 10000 * 0.7}" type="number"
                                maxFractionDigits="0"/> <span>万元</span></div>

                        <div class="valuation-info-top-Price">
                            <div class="loanAmount"><h5>评估总价(万元)</h5>

                                <p><g:formatNumber number="${this.leads?.loanAmount / 10000}" type="number"
                                                   maxFractionDigits="4"/></p></div>

                            <div class="valuation-info-top-Price-line"></div>

                            <div class="unitPrice"><h5>评估单价(元/平方米)</h5>

                                <p><g:formatNumber number="${this.leads?.unitPrice}" type="number"
                                                   maxFractionDigits="2"/></p></div>
                        </div>

                    </div>

                    <div class="bigBtn" style="padding: 0">
                        <a href="/leads/wxCreate3Step1?id=${this.leads?.id}"
                           class="linkBtn weui-btn weui-btn_plain_default">申请贷款</a>
                    </div>
                </div>
            </g:if>

            <g:if test="${this.params.status == "Failed"}">
                <div class="valuation-info-warp">
                    <div class="valuation-info-top">
                        <div class="valuation-info-top-txt">最高可贷金额<span>（可贷金额以实际金额为准）</span></div>

                        <div class="valuation-info-top-txt-val">待确认</div>

                        <div class="valuation-info-top-Price">
                            <div class="loanAmount"><h5>押品评估总价(万元)</h5>

                                <p>待确认</p></div>

                            <div class="valuation-info-top-Price-line"></div>

                            <div class="unitPrice"><h5>押品评估单价(元/平方米)</h5>

                                <p>待确认</p></div>
                        </div>

                    </div>

                    <div class="bigBtn" style="padding: 0">
                        <a href="/leads/wxCreate3Step1?id=${this.leads?.id}"
                           class="linkBtn weui-btn weui-btn_plain_default">申请贷款</a>
                    </div>
                </div>
            </g:if>
            <g:if test="${this.params.status == "Pending"}">
                <div class="valuation-info-warp">
                    <div class="valuation-info-top">
                        <div class="valuation-info-top-txt">最高可贷金额<span>（可贷金额以实际金额为准）</span></div>

                        <div class="valuation-info-top-txt-val"><g:formatNumber
                                number="${this.leads?.loanAmount / 10000 * 0.7}" type="number"
                                maxFractionDigits="0"/> <span>万元</span></div>

                        <div class="valuation-info-top-Price">
                            <div class="loanAmount"><h5>参考评估总价(元)</h5>

                                <p>${String.valueOf(this.leads?.loanAmount).substring(0, String.valueOf(this.leads?.loanAmount).lastIndexOf("."))}</p>
                            </div>

                            <div class="valuation-info-top-Price-line"></div>

                            <div class="unitPrice"><h5>参考评估单价(元/平方米)</h5>

                                <p>${String.valueOf(this.leads?.unitPrice).substring(0, String.valueOf(this.leads?.unitPrice).lastIndexOf("."))}</p>
                            </div>
                        </div>

                    </div>

                    <div class="bigBtn" style="padding: 0">
                        <a href="/leads/wxCreate3Step1?id=${this.leads?.id}"
                           class="linkBtn weui-btn weui-btn_plain_default">申请贷款</a>
                    </div>
                </div>
            </g:if>
        </div>

        <div class="bigBtn">

            <a href="/leads/wxCreate2Step1"
               class="linkBtn2 weui-btn weui-btn_plain_default">房产评估</a>
        </div>
    </div>
</form>



<script>
    $(".linkBtn").click(function () {
        $(this).addClass("active");
    });
    $(".linkBtn2").click(function () {
        $(this).addClass("active");
    });
</script>

</body>
</html>
